package com.project.movie.services;

import com.project.movie.dao.ActorRepository;
import com.project.movie.entities.Actor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ActorService {
    @Autowired
    ActorRepository actorRepository;

    public Actor save(Actor actor){
        return actorRepository.save(actor);
    }

    public List<Actor> getAll(){
        return actorRepository.findAll();
    }
}
